# Bedrock

> [Amazon Bedrock](https://aws.amazon.com/bedrock/) is a fully managed service that makes Foundation Models (FMs)
> from leading AI startups and Amazon available via an API. You can choose from a wide range of FMs to find the model that is best suited for your use case.

## Setup

You'll need to install a few official AWS packages as peer dependencies:

```bash npm2yarn
npm install @aws-crypto/sha256-js @aws-sdk/credential-provider-node @smithy/protocol-http @smithy/signature-v4 @smithy/eventstream-codec @smithy/util-utf8 @aws-sdk/types
```

You can also use Bedrock in web environments such as Edge functions or Cloudflare Workers by omitting the `@aws-sdk/credential-provider-node` dependency
and using the `web` entrypoint:

```bash npm2yarn
npm install @aws-crypto/sha256-js @smithy/protocol-http @smithy/signature-v4 @smithy/eventstream-codec @smithy/util-utf8 @aws-sdk/types
```

## Usage

import IntegrationInstallTooltip from "@mdx_components/integration_install_tooltip.mdx";

<IntegrationInstallTooltip></IntegrationInstallTooltip>

```bash npm2yarn
npm install @langchain/community
```

Note that some models require specific prompting techniques. For example, Anthropic's Claude-v2 model will throw an error if
the prompt does not start with `Human: `.

import CodeBlock from "@theme/CodeBlock";
import BedrockExample from "@examples/models/llm/bedrock.ts";

<CodeBlock language="typescript">{BedrockExample}</CodeBlock>
